//
//  QDBannerTools.m
//  simulateQuickDoctor
//
//  Created by locklight on 17/3/24.
//  Copyright © 2017年 PipiXia. All rights reserved.
//

#import "QDBannerTools.h"
#import <SVProgressHUD.h>

@implementation QDBannerTools

+ (void)pp_BannerTitle:(NSString *)content andTime:(float)delay{
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeBlack];
    [SVProgressHUD setDefaultStyle:SVProgressHUDStyleCustom];
    [SVProgressHUD setForegroundColor:[UIColor whiteColor]];
    [SVProgressHUD setBackgroundColor:PPColor];
    [SVProgressHUD showWithStatus:[NSString stringWithFormat:@"%@",content]];
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [SVProgressHUD dismiss];
    });
}

+ (void)pp_BannerErrorTitle:(NSString *)content andTime:(float)delay{
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeBlack];
    [SVProgressHUD setDefaultStyle:SVProgressHUDStyleCustom];
    [SVProgressHUD setForegroundColor:[UIColor whiteColor]];
    [SVProgressHUD setBackgroundColor:PPColor];
    [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"%@",content]];
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [SVProgressHUD dismiss];
    });
}

+ (void)pp_BannerSuccessTitle:(NSString *)content andTime:(float)delay{
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeBlack];
    [SVProgressHUD setDefaultStyle:SVProgressHUDStyleCustom];
    [SVProgressHUD setForegroundColor:[UIColor whiteColor]];
    [SVProgressHUD setBackgroundColor:PPColor];
    [SVProgressHUD showSuccessWithStatus:[NSString stringWithFormat:@"%@",content]];
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [SVProgressHUD dismiss];
    });
}

@end
